TSpinDateEdit  and  TDBSpinDateEdit
Version 1.4
   
(c) copyright 1997 by W.Braun. All rights reserved. 

Delphi VCL-Components

  

Dear developer and user,

with these components you can cover all date entryfields 
in your application and so you achieve an uniform formatted
outward shape of your application.

The componente supported the international/users 
settings of windowssystem date parameters. 

The manual entry of the date in this component is very
elaborate and catches the errorentrys.

Also you can append the Spin and Calendar functions to this components.

I hope these components will help you with your work and make it a 
little bit easier.

Content

    
   1. Installation
   2. Properties
   3. Description
   4. Registration   
   5. New
   6. Glossary	 


>>1. Installation 

Please use for Delphi 1.x  "Date_16.ZIP" and for Delphi 2.x  "Date_32.ZIP".

1. Copy the files DateEd.DCU, DateEd.DFM, DateEd.DCR, DateEd.RES, 
   into any subdirectory; e.g. C:\DELPHI\Z_COMP
2. In Delphi Choose Options | Install Components
3. Click Add
4. Type the name of directory where you placed the component followed
   by DATEED.DCU, e.g. C:\DELPHI\Z_COMP\DATEED.DCU 
5. Click OK
6. Click OK

In the new page on your component palette WB you will find
this new components. 
Now you only have to click these components and afterwards
you put then on your form at the right position.


>>2.  Properties


The following properties apply to both components 

TSpinDateEdit, TDBSpinDateEdit


Properties :
      property Alignment: default taLeftJustify;
      property Autosize;  
      property +CalendarProperties, Calendarpopup properties :
                Enabled     : boolean, Calendarbutton/Calendarpopup 
                              on/off , default on
                AutoStart   : boolean, pops the calendar OnEnter,
			      default False 
                Color       : TColor, Calendarpopup color, default clBackground
                HelpContext : THelpContext, HelpContext for Calendarpopup
                Position    : Position of Calendarform, default posAbove
                              [posAbove,posBelow,posLeft,posRight,posOnTop]
                StartOfWeek : day of week the calendargrid starts on
                              default daySU  
                	      [daySu,dayMo,dayTu,dayWe,dayTh,dayFr,daySa] 
                WeekOfYear  : boolean, calendarweek of year on/off
                WeekOfYearColor : TColor, color for calendarweek, default clBlack;
      
      property Century : boolean, Century on/off default True
      property Color;
      property Ctl3D;
      property DateValue : string, Date in ShortDateFormat 
      property DragCursor;
      property DragMode;
      property Enabled;
      property Font ;
      property IncrementDate: Increment for Spin or +/-, default iOneDay
               [iOneDay, iTwoDays, iThreeDays, iOneWeek, iTwoWeek,
                iOneMonth,iQuarterYear,iHalfYear,iOneYear]                          
      property Info : InfoMessageBox about this component
      property ParentCtl3D;
      property ParentFont;
      property ParentShowHint;
      property PopupMenu;
      property ReadOnly;
      property ShowHint;
      property Spin :  boolean, Spinbuttons on/off, default off
      property TabOrder;
      property TabStop;
      property Value: TDateTime, Date in TDateEditFormat
      property Visible;
      property OnChange;
      property OnClick;
      property OnDblClick;
      property OnDragDrop;
      property OnDragOver;
      property OnEndDrag;
      property OnEnter;
      property OnExit;
      property OnKeyDown;
      property OnKeyPress;
      property OnKeyUp;
      property OnMouseDown;
      property OnMouseMove;
      property OnMouseUp;


Additional the TDBSpinDateEdit have follows properties

DataField	DateField , Datatype ftDate, ftDateTime
DataSource	DataSource for Table or Query
      	

>>3. Description


TSpinDateEdit serves for simplification of the entry of Date. 
The standardly delivered tools from Borland are only useful 
for limited possibilities (look TMaskEdit,TDbEdit). 

The entry of the date issue with ShortDateFormat ( e.g. 01/10/1997 ), 
whereby the DateSeparatorChar will be automatically jump over.
 
The employer can change date of this kind  :
 1. By manuel entry of Date. The component will be correct 
    errorentries ( e.g. 13 Month , 11/31 , 2/29/97, ... ) . 
 2. With +/- or with Up/Down-Button from SpinButton
 3. Click on the calendarbutton or DoubleClick on entryfield
    open the calendar and the employer can choose the 
    desire Date.

The programmer can change date with follow properties : 
 1. DateValue : date can be entry as string ( ShortDateFormat).
    The property Value will be updated automatically.     
    Used to set the current date in the IDE. If datestring is faulty 
    the IDE will display an errormessage. 
    At the runtime it's better to use the property Value,
    because an incorrectly datestring will be produce exception and,
    if it's not to be intercepted, a messagebox.   
    Use the DateValue as DateString (e.g. Label1.Caption:=SpinDateEdit1.DateValue)
    and Value as connection to Delphi-Datefunctions 
    (e.g. SpinDateEdit1.Value:=Now).

 2. Value : is a type of TDateTime and represent date as number.
    The property DateValue will be updated automatically.     

    This property is the connection to the datesystemroutines
    ( e.g. Now, DateToStr, TDateField.Value, etc.).   
     
    You can use this property also in the IDE, but you must know :
    for Delphi 2.x Value:=0 is equal to 12/30/1899.
	
    Decimalpart of TDateTime represent in Delphi the timepart of date,
    so you can also use decimalpart of Value as time.  
     
    The limits of Value are : 
    const      
    {$IFDEF WIN32}      
    DateDelphi   =-657434; { Date=01/01/0100 Min} 
    DateDelphiMax=2958465; { Date=12/31/9999}
    {$ELSE}
    DateDelphi   =1;       { Date=01/01/0001 Min} 
    DateDelphiMax=3652059; { Date=12/31/9999}
    {$ENDIF}

    This limits are defined from delphideveloperteam 
    ( DelphiDateconventions), only the DateDelphi for Delphi 2.x 
    is defined as date of 01/01/0100, because datesystemroutinies
    not working correctly with smaller values.
         

The property Century decided whether the DateValue have the centurypart,
independent of systemsettings. So you can design your form independent of
individual windowssystemsettings from employer.
The property of datesystemroutinies to add to result the century of 
systemdate if year is smaller as 100 will be catched.   

Property Spin make the capability of Increment visible.


Calendar is a nonmodalform with calendargrid.

CalendarProperties :

 -Enabled     : make Calendar available or not.
  If true then CalendarButton is visible, the applier can by click
  on this button or doubleclick on the entryfield start Calendar.
 -AutoStart   : start the calendarwindow OnEnter
 -Color       : color of calendarwindow 
 -Helpcontext : Helpcontext for Calendarwindow
 -Position    : position of calendarwindow on screen to the editfield  
 -StartOfWeek : first day of week of calendargrid
 -WeekOfYear  : calendarweek 
 -WeekOfYearColor : color of calendarweek 

Description of Calendarform :
- Calendargrid.
- Label with selected month and year. Doubleclick reset to topical date
- buttons for month forward/Back
- buttons for year forward/Back
- tabulator/shift-tabulator month forward/back
- +/- Increment 
- bug by overstep of datelimits

Calendarform will be closed by :
-Pressing the enterkey, selected date will be commit to entryfield
-Doubleclick on a day in calendar, selected date will be commit to entryfield
-Pressing the escapekey or click outside of calendarform, 
 result will not be commit. 

The additional properties of the TDBSpinDateEdit be useful for 
databaseconnection and they can use for display and/or manipulation 
the entries of the fields of the connected table or query. 

Other Properties inherited unchanged from TCustomEdit, same adjust
for my requirements.


>>4. Registration

Please read also the file order.txt

Price for this components is 
  -$15.00 (US) without Source 
  -$30.00 (US) with Sourcecode ( > 2500 lines ).

To order you can do this by following options :

1. CompuServe's Online Registration : GO SWREG 

   TSpinDateEdit : -File-ID 14245  without Source
                   -File-ID 14900  with    Source
   TSpinDblEdit :  -File-ID 12832  without Source
                   -File-ID 14901  with    Source   

2. Order by sending me an e-Mail.

3. Fill out and send the order form "order.txt"  
 

If I can send the components to you on electronic way, so you don't need add 
postal charge, another way please add 2.00$ postage Germany, 
3.00$ for all other countries.

Registered users will receive any updates for the next year. 
Additional the registered version include the TSpinDateedit-calendargrid as
separat component.

The unregistered version can use with all functions, but every month 
on the 8th this components will be open a messagewindow by creation himself 
when application is running without Delphi IDE. 




       
>>5. New

Version 1.4

-Calendar AutoStart : Enter with VK_TAB now fixed with Timer
		      ( no jump month before open Calendar) 	
-AutoSelect
-ParentColor

 
New in Version 1.3 :

Thanks to Markus Schwaiger for suggestion of calendarweek

     -DateedC Unit not necessary

     -Calendarproperties
        property Enabled
        property AutoStart
        property Color                  New in 1.3
        property HelpContext
        property Position
        property StartOfWeek
        property WeekOfYear             New in 1.3
        property WeekOfYearColor        New in 1.3

      not available : property Calendar          New CalendarProperties.Enabled
                      property AutoCalendar      New CalendarProperties.AutoStart
                      property CalHelpContext    New CalendarProperties.HelpContext
                      property CalPosition       New CalendarProperties.Position
                      property CalStartOfWeek    New CalendarProperties.StartOfWeek

                      property Increment         New IncrementDate
     Bug fixed : 
       -AutoCalendar not jumps to the next month into calendargrid 
       -DB OnEnter,OnExit not longer change Datalink.State to modified
        without Edit.Change
       -SpinDateEdit.Height the same like TEdit.Height 


New in version 1.2 :

- much better controls of Spacebar
- bug fixes  


New in version 1.1:

(thanks to Richard Haven for his suggestion)

- Increment property not longer supported, please use IncrementDate
- IncrementDate enumeration property 
  (iOneDay, iTwoDays, iThreeDays, iOneWeek, iTwoWeek, iOneMonth,
  iQuarterYear,iHalfYear,iOneYear)
- AutoCalendar, pops the calendar OnEnter
- CalStartOfWeek, day of the week the calendar starts on
  (daySu,dayMo,dayTu,dayWe,dayTh,dayFr,daySa) 
- Space bar allow quick enter current date ( or part of date)
  Puts in the actual and follows parts (cursorposition) of datevalue the 
  respective part of current date.
  (e.g. datemask is mm/dd/yy. If cursor on month part spacebar
   fill mm/dd/yy with current date, if cursor on day part spacebar
   fill dd/yy, if ...)


- Clear now working correctly
- VK_DELETE,VK_BACK,WM_Cut,WM_Past now working correctly if
  the complete text selected



>>6. Glossary


I hope you get on well with this short description.
If you have questions or suggestion, send me some lines by eMail or Fax.
I'm thankfull for every good proposition.



Yours, 

Willi Braun

eMail : 106216.1307@compuserve.com
Fax  :  +49 621 6296754






>>7. Order/Register form, use only for registration without 
     Compuserve Shareware Register Forum ( GO SWREG )



   ORDER FORM
   

   TSpinDblEdit/TDBSpinDblEdit    
   TSpinDateEdit/TDBSpinDateEdit 


   Name:   _______________________

   Address:_______________________

           _______________________

           _______________________

           _______________________



   Product:

   ____  16&32 Bit TSpinDateEdit\TDBSpinDateEdit        $15 US DOLLARS
   ____  16&32 Bit TSpinDateEdit\TDBSpinDateEdit Source $30 US DOLLARS
   ____  16&32 Bit TSpinDblEdit\TDBSpinDblEdit          $15 US DOLLARS
   ____  16&32 Bit TSpinDblEdit\TDBSpinDblEdit   Source $30 US DOLLARS


                 Check or money order only.
		 PLEASE MAKE PAYABLE TO "W. BRAUN".

   Shipping:

           ____  3.5" Floppy Disk ( Add $2 postage Germany, other $3) 

           ____  eMail : ____________________________


   Mail Address :
      W. Braun
      Bruehlstr. 40
      67069 Ludwigshafen
      Germany
